Package com.cisco.pt.ipc.sim.pdu.impl
Class IPHeaderImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCDataImpl
com.cisco.pt.ipc.sim.pdu.impl.SignalImpl
com.cisco.pt.ipc.sim.pdu.impl.PduImpl
com.cisco.pt.ipc.sim.pdu.impl.HeaderImpl
com.cisco.pt.ipc.sim.pdu.impl.IPHeaderImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Shortprotected IPAddressprotected Byteprotected Shortprotected Byteprotected Shortprotected intprotected intprotected Shortprotected IPAddressprotected Shortprotected Shortprotected Byteprotected ByteFields inherited from class com.cisco.pt.ipc.sim.pdu.impl.HeaderImpl
payloadFields inherited from class com.cisco.pt.ipc.sim.pdu.impl.SignalImpl
fieldNames, fieldTable, signalType, typeTable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencodeTypeAndPayload(EncodedBuffer buffer) getFieldType(String fieldName) getFlags()intintgetTtl()voidpduRead(EncodedBuffer buffer) voidread(EncodedBuffer buffer) Reads this object from an EncodedBuffer of raw datavoidsetChecksum(Short checksum) voidsetDstAddress(IPAddress dstAddress) voidvoidsetFragmentOffset(Short fragmentOffset) voidsetHeaderLength(Byte headerLength) voidsetIdentification(Short identification) voidsetOptions(int options) voidsetPadding(int padding) voidsetProtocol(Short protocol) voidsetSrcAddress(IPAddress srcAddress) voidsetTotalLength(Short totalLength) voidvoidsetTypeOfService(Byte typeOfService) voidsetVersion(Byte version) Methods inherited from class com.cisco.pt.ipc.sim.pdu.impl.HeaderImpl
getPayload, setPayloadMethods inherited from class com.cisco.pt.ipc.sim.pdu.impl.SignalImpl
getFieldValueMethods inherited from class com.cisco.pt.ipc.impl.IPCDataImpl
checkType, pduReadBoolean, pduReadByte, pduReadDouble, pduReadFloat, pduReadInt, pduReadIPAddress, pduReadIPCData, pduReadIPV6Address, pduReadLong, pduReadMACAddress, pduReadPair, pduReadQString, pduReadShort, pduReadString, pduReadUUID, pduReadVector, readBoolean, readByte, readDouble, readFloat, readInt, readIPAddress, readIPCData, readIPV6Address, readLong, readMACAddress, readPair, readQString, readShort, readString, readUUID, readVectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.sim.pdu.Header
getPayload, setPayloadMethods inherited from interface com.cisco.pt.ipc.sim.pdu.Signal
getFieldValue
-
Field Details
-
version
-
headerLength
-
typeOfService
-
totalLength
-
identification
-
flags
-
fragmentOffset
-
ttl
-
protocol
-
checksum
-
srcAddress
-
dstAddress
-
options
protected int options -
padding
protected int padding
-
-
Constructor Details
-
IPHeaderImpl
public IPHeaderImpl()
-
-
Method Details
-
getVersion
- Specified by:
getVersionin interfaceIPHeader- Returns:
- Byte Returns a Byte
-
setVersion
- Specified by:
setVersionin interfaceIPHeader- Parameters:
version- Takes in a parameter of version
-
getHeaderLength
- Specified by:
getHeaderLengthin interfaceIPHeader- Returns:
- Byte Returns a Byte
-
setHeaderLength
- Specified by:
setHeaderLengthin interfaceIPHeader- Parameters:
headerLength- Takes in a parameter of headerLength
-
getTypeOfService
- Specified by:
getTypeOfServicein interfaceIPHeader- Returns:
- Byte Returns a Byte
-
setTypeOfService
- Specified by:
setTypeOfServicein interfaceIPHeader- Parameters:
typeOfService- Takes in a parameter of typeOfService
-
getTotalLength
- Specified by:
getTotalLengthin interfaceIPHeader- Returns:
- Short Returns a Short
-
setTotalLength
- Specified by:
setTotalLengthin interfaceIPHeader- Parameters:
totalLength- Takes in a parameter of totalLength
-
getIdentification
- Specified by:
getIdentificationin interfaceIPHeader- Returns:
- Short Returns a Short
-
setIdentification
- Specified by:
setIdentificationin interfaceIPHeader- Parameters:
identification- Takes in a parameter of identification
-
getFlags
-
setFlags
-
getFragmentOffset
- Specified by:
getFragmentOffsetin interfaceIPHeader- Returns:
- Short Returns a Short
-
setFragmentOffset
- Specified by:
setFragmentOffsetin interfaceIPHeader- Parameters:
fragmentOffset- Takes in a parameter of fragmentOffset
-
getTtl
-
setTtl
-
getProtocol
- Specified by:
getProtocolin interfaceIPHeader- Returns:
- Short Returns a Short
-
setProtocol
- Specified by:
setProtocolin interfaceIPHeader- Parameters:
protocol- Takes in a parameter of protocol
-
getChecksum
- Specified by:
getChecksumin interfaceIPHeader- Returns:
- Short Returns a Short
-
setChecksum
- Specified by:
setChecksumin interfaceIPHeader- Parameters:
checksum- Takes in a parameter of checksum
-
getSrcAddress
- Specified by:
getSrcAddressin interfaceIPHeader- Returns:
- IPAddress Returns a IPAddress
-
setSrcAddress
- Specified by:
setSrcAddressin interfaceIPHeader- Parameters:
srcAddress- Takes in a parameter of srcAddress
-
getDstAddress
- Specified by:
getDstAddressin interfaceIPHeader- Returns:
- IPAddress Returns a IPAddress
-
setDstAddress
- Specified by:
setDstAddressin interfaceIPHeader- Parameters:
dstAddress- Takes in a parameter of dstAddress
-
getOptions
public int getOptions()- Specified by:
getOptionsin interfaceIPHeader- Returns:
- int Returns a int
-
setOptions
public void setOptions(int options) - Specified by:
setOptionsin interfaceIPHeader- Parameters:
options- Takes in a parameter of options
-
getPadding
public int getPadding()- Specified by:
getPaddingin interfaceIPHeader- Returns:
- int Returns a int
-
setPadding
public void setPadding(int padding) - Specified by:
setPaddingin interfaceIPHeader- Parameters:
padding- Takes in a parameter of padding
-
getFieldType
- Overrides:
getFieldTypein classHeaderImpl
-
read
Reads this object from an EncodedBuffer of raw data- Specified by:
readin interfaceIPCData- Overrides:
readin classHeaderImpl- Parameters:
buffer- The EncodedBuffer that contains the raw data from which to construct this object
-
pduRead
- Specified by:
pduReadin interfaceSignal- Overrides:
pduReadin classHeaderImpl
-
getOrderedFieldNames
- Specified by:
getOrderedFieldNamesin interfaceSignal- Overrides:
getOrderedFieldNamesin classHeaderImpl
-
encodeTypeAndPayload
- Specified by:
encodeTypeAndPayloadin interfaceSignal- Overrides:
encodeTypeAndPayloadin classHeaderImpl
-